<!--
 * @Author: zhoujieyu zhoujieyu_web@163.com
 * @Date: 2024-09-25 16:23:45
 * @LastEditors: zhoujieyu zhoujieyu_web@163.com
 * @LastEditTime: 2024-09-27 10:03:38
 * @FilePath: \Code\动态对象.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>动态对象</title>
    <link rel="stylesheet" href="./lib/styles.css" />

    <script type="text/javascript" src="./lib/aircity/ac_conf.js"></script>
    <script type="text/javascript" src="./lib/aircity/ac.min.js"></script>
    <script type="text/javascript" src="./lib/Vue3.js"></script>
  </head>
  <body>
    <div id="dom">
      <div id="player"></div>

      <div class="btn-list">
        <div onclick="goHtml('./灯光.html')" class="btn">灯光调节</div>
        <div onclick="goHtml('./限高分析.html')" class="btn">限高分析</div>
      </div>
    </div>

    <script type="text/javascript">
      const { createApp } = Vue
      /**
       * 索引按钮
       */
      const goHtml = url => {
        window.location.href = url
      }

      /**
       * 自适应分辨率
       */
      const onResize = async () => {
        let playerView = document.getElementById('player')
        playerView.style.height = window.innerHeight + 'px'
        playerView.style.width = window.innerWidth + 'px'
      }

      const app = createApp({
        setup() {
          // 页面加载调用
          window.addEventListener('load', OnLoad, true)
          // 页面窗口变换调用
          window.addEventListener('resize', onResize, true)
          return {}
        }
      })
      app.mount('#dom')

      /**
       * 页面离开事件(离开时清除此页面的操作及重置场景)
       */
      window.onunload = function (e) {
        // 重置场景
        fdapi.reset(1 | 2 | 4)
      }
    </script>
  </body>
</html>
